﻿// ===============================================================================
// MarkupNotFoundException.cs
// EOS Web Framework
// ===============================================================================
// Copyright (c) EOS Development Group. All rights reserved.
// ===============================================================================

namespace EOS.Framework.Web.Mvc
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// The exception that is thrown when a markup is not found.
    /// </summary>
    [Serializable]
    public class MarkupNotFoundException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MarkupNotFoundException"/> class.
        /// </summary>
        public MarkupNotFoundException() : base() { }

        /// <summary>
        /// Initializes a new instance of the <see cref="MarkupNotFoundException"/> class with the name of the 
        /// parameter that causes this exception.
        /// </summary>
        /// <param name="errorMessage">The error message that explains the reason for this exception.</param>
        public MarkupNotFoundException(string errorMessage)
            : base(errorMessage) { }

        /// <summary>
        /// Initializes a new instance of the <see cref="MarkupNotFoundException"/> class with a specified 
        /// error message and the exception that is the cause of this exception.
        /// </summary>
        /// <param name="errorMessage">The error message that explains the reason for this exception.</param>
        /// <param name="innerEx">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) 
        /// if no inner exception is specified.</param>
        public MarkupNotFoundException(string errorMessage, Exception innerEx)
            : base(errorMessage, innerEx) { }

        /// <summary>
        /// StreamingContext)  Initializes a new instance of the <see cref="MarkupNotFoundException"/> 
        /// class with serialized data. 
        /// </summary>
        /// <param name="serializationInfo">The object that holds the serialized object data.</param>
        /// <param name="context">An object that describes the source or destination of the serialized data.</param>
        protected MarkupNotFoundException(SerializationInfo serializationInfo, StreamingContext context)
            : base(serializationInfo, context)
        { }
    }
}
